﻿using System.Runtime.Serialization;
using mal.balades.Business.Web;
using System;

namespace mal.balades.Business.DataModel
{
    public partial class MapVisitList
    {
        public MapVisitList(VisitList visit)
        {
            this.Latitude = visit.Latitude;
            this.Longitude = visit.Longitude;
            this.Picture = visit.Picture;
            this.PlaceCategoryPicture = visit.PlaceCategoryPicture;
            this.SumUp = visit.SumUp;
            this.Title = visit.Title;
            this.Url = visit.Url;
            this.Zoom = visit.Zoom;
            this.Distance = Math.Round( visit.Distance,1);
        }

        [DataMember]
        public string FullUrl
        {
            get
            {
                return UrlManager.VisitUrl(this.Url);
            }
            set { }
        }

        [DataMember]
        public string FullPictureUrl
        {
            get
            {
                return UrlManager.VisitPictureUrl(this.Picture);
            }
            set { }
        }
    }
}
